/*
 * MainClient.java
 *
 * Created on December 24, 2009, 12:45 AM
 */

package demogroup5client.ui;

import entity.Customer;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.swing.JOptionPane;
import javax.swing.UIManager;

/**
 *
 * @author  Administrator
 */
public class testDungtv extends javax.swing.JFrame {
    Customer customer;
    //static ListProduct ls = new ListProduct();
    Date date = new Date(); ;
    SimpleDateFormat fomat=new SimpleDateFormat("DD/mm/yyyy");;
    
    /** Creates new form MainClient */
    public testDungtv(Customer acc) {
        super("Manage buy medical");
        this.customer = acc;
        this.customer.setAdmin(false);
        try {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(this, ex.getMessage());
        }
        
        initComponents();
        
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jTabbedPane1 = new javax.swing.JTabbedPane();
        pnlHome = new javax.swing.JPanel();
        pnlManageBill = new javax.swing.JPanel();
        pnlPurchase = new javax.swing.JPanel();
        pnlSell = new javax.swing.JPanel();
        pnlManageEm = new javax.swing.JPanel();
        pnlFilter = new javax.swing.JPanel();
        jPanel1 = new javax.swing.JPanel();
        jMenuBar1 = new javax.swing.JMenuBar();
        mnuFile = new javax.swing.JMenu();
        mnuEdit = new javax.swing.JMenu();
        mnuView = new javax.swing.JMenu();
        mnuTool = new javax.swing.JMenu();
        mnuHelp = new javax.swing.JMenu();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Manager sell and buy medicine");
        setLocationByPlatform(true);
        getContentPane().setLayout(null);

        jTabbedPane1.setTabPlacement(javax.swing.JTabbedPane.LEFT);

        pnlHome.setFont(new java.awt.Font("Tahoma", 0, 12));
        pnlHome.setLayout(null);

        pnlHome = new Home();

        jTabbedPane1.addTab(" Home               ", new javax.swing.ImageIcon(getClass().getResource("/resourceImage/Home.png")), pnlHome); // NOI18N

        pnlManageBill.setLayout(null);

        pnlManageBill = new ManageBill();

        jTabbedPane1.addTab("Manage bill      ", new javax.swing.ImageIcon(getClass().getResource("/resourceImage/Products.png")), pnlManageBill); // NOI18N

        javax.swing.GroupLayout pnlPurchaseLayout = new javax.swing.GroupLayout(pnlPurchase);
        pnlPurchase.setLayout(pnlPurchaseLayout);
        pnlPurchaseLayout.setHorizontalGroup(
            pnlPurchaseLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 979, Short.MAX_VALUE)
        );
        pnlPurchaseLayout.setVerticalGroup(
            pnlPurchaseLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 535, Short.MAX_VALUE)
        );

        pnlPurchase = new Purchase();

        jTabbedPane1.addTab("Purchase          ", new javax.swing.ImageIcon(getClass().getResource("/resourceImage/Purchase.png")), pnlPurchase); // NOI18N

        javax.swing.GroupLayout pnlSellLayout = new javax.swing.GroupLayout(pnlSell);
        pnlSell.setLayout(pnlSellLayout);
        pnlSellLayout.setHorizontalGroup(
            pnlSellLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 979, Short.MAX_VALUE)
        );
        pnlSellLayout.setVerticalGroup(
            pnlSellLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 535, Short.MAX_VALUE)
        );

        pnlSell = new Sell();

        jTabbedPane1.addTab("Sell                   ", new javax.swing.ImageIcon(getClass().getResource("/resourceImage/Sale.png")), pnlSell); // NOI18N

        javax.swing.GroupLayout pnlManageEmLayout = new javax.swing.GroupLayout(pnlManageEm);
        pnlManageEm.setLayout(pnlManageEmLayout);
        pnlManageEmLayout.setHorizontalGroup(
            pnlManageEmLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 979, Short.MAX_VALUE)
        );
        pnlManageEmLayout.setVerticalGroup(
            pnlManageEmLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 535, Short.MAX_VALUE)
        );

        pnlManageEm = new ManageEmp();

        jTabbedPane1.addTab("Manage Emp ", new javax.swing.ImageIcon(getClass().getResource("/resourceImage/Customers.png")), pnlManageEm); // NOI18N

        javax.swing.GroupLayout pnlFilterLayout = new javax.swing.GroupLayout(pnlFilter);
        pnlFilter.setLayout(pnlFilterLayout);
        pnlFilterLayout.setHorizontalGroup(
            pnlFilterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 979, Short.MAX_VALUE)
        );
        pnlFilterLayout.setVerticalGroup(
            pnlFilterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 535, Short.MAX_VALUE)
        );

        pnlFilter = new Filter(customer);

        jTabbedPane1.addTab("Filter", pnlFilter);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 979, Short.MAX_VALUE)
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 535, Short.MAX_VALUE)
        );

        jTabbedPane1.addTab("tab7", jPanel1);

        getContentPane().add(jTabbedPane1);
        jTabbedPane1.setBounds(0, 0, 1127, 540);

        mnuFile.setText("File");
        jMenuBar1.add(mnuFile);

        mnuEdit.setText("Edit");
        jMenuBar1.add(mnuEdit);

        mnuView.setText("View");
        mnuView.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                mnuViewMouseClicked(evt);
            }
        });
        jMenuBar1.add(mnuView);

        mnuTool.setText("Tool");
        jMenuBar1.add(mnuTool);

        mnuHelp.setText("Help");
        jMenuBar1.add(mnuHelp);

        setJMenuBar(jMenuBar1);

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-1000)/2, (screenSize.height-600)/2, 1000, 600);
    }// </editor-fold>//GEN-END:initComponents

    private void mnuViewMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_mnuViewMouseClicked
        // TODO add your handling code here:
        
}//GEN-LAST:event_mnuViewMouseClicked
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        testDungtv mainClient = new testDungtv(new Customer());
        mainClient.pnlHome.setVisible(false);
        mainClient.setVisible(true);
       
    }
//        
////        java.awt.EventQueue.invokeLater(new Runnable() {
////            public void run() {
////                new MainClient(null).setVisible(true);
////            }
////        });
//    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JMenu mnuEdit;
    private javax.swing.JMenu mnuFile;
    private javax.swing.JMenu mnuHelp;
    private javax.swing.JMenu mnuTool;
    private javax.swing.JMenu mnuView;
    private javax.swing.JPanel pnlFilter;
    private javax.swing.JPanel pnlHome;
    private javax.swing.JPanel pnlManageBill;
    public javax.swing.JPanel pnlManageEm;
    private javax.swing.JPanel pnlPurchase;
    private javax.swing.JPanel pnlSell;
    // End of variables declaration//GEN-END:variables
    
}
